using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.Modeling;

namespace DslCrossModelFramework.Environment {

    /// <summary>
    /// Contract for dealing with an integration environment like Visual Studio
    /// </summary>
    public interface IEnvironmentConfiguration {

        /// <summary>
        /// Gets the name of the environment.
        /// </summary>
        /// <value>The name.</value>
        string Name { get; }

        /// <summary>
        /// Gets a value indicating whether this environment is active.
        /// </summary>
        /// <value><c>true</c> if this instance is active; otherwise, <c>false</c>.</value>
        bool IsActive { get; }

        void InitializeEnvironment();

        bool IsInitialized{ get;}


        List<IModelFileInfo> ModelFiles{ get; }


        List<DslToolsPackageInfo> Packages{ get; }

        void ResetEnvironment();


        /// <summary>
        /// Gets the temp model file helper.
        /// </summary>
        /// <returns></returns>
        IModelFileHelper GetTempModelFileHelper();

        /// <summary>
        /// Gets the integration service.
        /// </summary>
        /// <returns></returns>
        IModelDirectory GetModelDirectory();

        void CheckForDynamicStores();

        List<Store> Stores{ get; }

        /// <summary>
        /// Logs the message.
        /// </summary>
        /// <param name="message">The message.</param>
        void LogMessage(string message);

        event EventHandler<ModelFileEventArgs> ModelFileAdded;
        event EventHandler<ModelFileEventArgs> ModelFileRemoved;
        event EventHandler<ModelFileEventArgs> ModelFileLoaded;
        event EventHandler<ModelFileEventArgs> ModelFileUnloaded;
        event EventHandler<ModelFileEventArgs> ModelFileUpdated;
    }
}